from django.http import HttpResponse
from django.shortcuts import redirect
from django.shortcuts import reverse


def index(request):
    username = request.GET.get('username')
    if username:
        return HttpResponse('前台首页')
    else:
        login_url = reverse('font:login')
        return redirect(login_url)


def login(request):
    return HttpResponse('前台登录页面')